import React from "react";
import MainLayout from "../components/mainLayout";

const Home = React.lazy(() => import("../views/home"));
const Login = React.lazy(() => import("../views/login"));
const Set = React.lazy(() => import("../views/set"));
const List = React.lazy(() => import("../views/list"));
const ListAdd = React.lazy(() => import("../views/listAdd"));

export const router_list = [
  {
    path: "/",
    element: <MainLayout>
      <Home></Home>
    </MainLayout>,
    title: "首页",
  },
  {
    path: "/login",
    element: <Login></Login>,
    title: "登录",
    hidden: true
  },
  {
    path: "/list",
    title: "列表操作",
    children: [{
      path: '/list/manage',
      element: <MainLayout>
        <List></List>
      </MainLayout>,
      title: '列表管理'
    },{
      path: '/list/add',
      element: <MainLayout>
        <ListAdd></ListAdd>
      </MainLayout>,
      title: '列表添加'
    }]
  },
  {
    path: "/set",
    element: <MainLayout>
      <Set></Set>
    </MainLayout>,
    title: "设置",
  },
];
